<template>
  <view :class="viewClassNames">
    <view class="h-10 leading-10 text-center">列表部件</view>
    <view class="list-container">
      <view v-for="item in c.state.rows" :key="item.path" class="mb-3">
        <view class="flex bg-white items-center justify-between p-4 mb-2">
          <text class="flex-1 text-4 text-dark">{{ item.data.srfmajortext }}</text>
        </view>
      </view>
    </view>
  </view>
</template>

<script lang="ts" setup>
import { MDCtrlController } from '@ibiz-template/runtime';
import { useNamespace, useControlController } from "../use";

const c = useControlController((...args) => new MDCtrlController(...args));
const ns = useNamespace(`control-${c.model.controlType!.toLowerCase()}`);

const viewClassNames = computed(() => [ns.b()]);
</script>
